﻿using bat_sym.Helpers;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace bat_sym.Models
{
    public enum BatBehaviour
    {
        Cooperative,
        Cheating
    }

    public class Bat : ViewModelBase
    {
        private BatBehaviour _behaviour;

        private int _foodAmmount;

        private int age = 0;

        private int days_parent = 0;

        private ObservableCollection<Bat> _observedBats;

        private ObservableCollection<Bat> _family;

        public bool alive = true;

        private string _label;

        public Bat()
        {
            _observedBats = new ObservableCollection<Bat>();
            _family = new ObservableCollection<Bat>();
        }

        public BatBehaviour Behaviour
        {
            get
            {
                return _behaviour;
            }
            set
            {
                _behaviour = value;
                NotifyPropertyChanged("Behaviour");
            }
        }

        public int DaysParent
        {
            get
            {
                return days_parent;
            }
            set
            {
                days_parent = value;
            }
        }

        public int Age
        {
            get
            {
                return age;
            }
            set
            {
                age = value;
                NotifyPropertyChanged("Age");
            }
        }

        public string Label
        {
            get
            {
                return _label;
            }
            set
            {
                _label = value;
                NotifyPropertyChanged("Label");
            }
        }

        public int FoodAmmount
        {
            get
            {
                return _foodAmmount;
            }
            set
            {
                _foodAmmount = value;
                NotifyPropertyChanged("FoodAmmount");
            }
        }

        public ObservableCollection<Bat> ObservedBats
        {
            get
            {
                return _observedBats;
            }
            set
            {
                _observedBats = value;
                NotifyPropertyChanged("ObservedBats");
            }
        }

        public ObservableCollection<Bat> Family
        {
            get
            {
                return _family;
            }
            set
            {
                _family = value;
                NotifyPropertyChanged("Family");
            }
        }
    }
}
